package com.dlc.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.model.StockChangeReason;
import com.dlc.shop.common.util.PageParam;

import java.util.List;

/**
 *
 *
 * @author LGH
 * @date 2021-09-07 16:04:18
 */
public interface StockChangeReasonService extends IService<StockChangeReason> {

    /**
     * 分页查询出入库原因
     * @param page
     * @param stockChangeReason
     * @return
     */
    IPage<StockChangeReason> pageByParams(PageParam<StockChangeReason> page, StockChangeReason stockChangeReason);

    /**
     * 保存出入库原因
     * @param stockChangeReason
     */
    void saveInfo(StockChangeReason stockChangeReason);

    /**
     * 更新出入库原因
     * @param stockChangeReason
     */
    void updateInfo(StockChangeReason stockChangeReason);

    /**
     * 根据参数获取出入库原因
     * @param stockChangeReason
     * @return
     */
    List<StockChangeReason> listByParams(StockChangeReason stockChangeReason);

    /**
     * 改变出入库原因状态
     * @param shopId
     * @param stockChangeReasonId
     * @param status
     */
    void changeStatus(Long shopId, Long stockChangeReasonId, Integer status);

    /**
     * 根据id与店铺id获取出入库原因
     * @param stockChangeReasonId
     * @param shopId
     * @return
     */
    StockChangeReason getInfoByIdAndShopId(Long stockChangeReasonId, Long shopId);
}
